float4x4 worldViewProjection : WorldViewProjection;

sampler diffuseSampler;

int hasTex;
float4 diffuse;

struct VertexShaderInput {
	float4 position : POSITION;
	float2 tex :TEXCOORD0;
};
	
VertexShaderInput vertexShaderFunction(VertexShaderInput input) {
	VertexShaderInput output;

	output.position = mul(input.position, worldViewProjection);
	output.tex = input.tex;
	return output;
}
  
float4 pixelShaderFunction(VertexShaderInput input): COLOR {
    if(hasTex){
	    float4 texColor = tex2D(diffuseSampler, input.tex);
	    diffuse = diffuse * texColor;
    }
	return diffuse;
}
  
// #o3d VertexShaderEntryPoint vertexShaderFunction
// #o3d VertexShaderEntryPoint vertexShaderFunction
// #o3d PixelShaderEntryPoint pixelShaderFunction
// #o3d MatrixLoadOrder RowMajor